package com.balabala.gym_user.mapper;

import com.balabala.gym_user.pojo.entity.VipCard;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author 何涛
 * @Date: 2023/05/01/ 14:59
 * @description 会员卡mapper
 */
public interface VipCardMapper extends BaseMapper<VipCard> {
    /**
     * 查询课程支持的会员卡
     * @param courseId
     * @return
     */
    List<VipCard> getSupportVipCardByCourseId(Long courseId);

    /**
     * 根据会员卡类型查询会员卡
     * @param cardType
     * @return
     */
    @Select("SELECT * from tb_vip_card where tb_vip_card.card_type=#{cardType}")
    List<VipCard> findByCardType(Integer cardType);
}
